import request from '@/utils/request'

// 查询极客补发销售列表
export function listHairSalesman(query) {
  return request({
    url: '/system/hairSalesman/list',
    method: 'get',
    params: query
  })
}

// 查询极客补发销售详细
export function getHairSalesman(id) {
  return request({
    url: '/system/hairSalesman/' + id,
    method: 'get'
  })
}

// 生成销售对应的企业微信联系二维码
export function generateSalesManQRCode(id) {
  return request({
    url: '/system/hairSalesman/generateCustomerServiceQrCode?userId=' + id,
    method: 'get'
  })
}

// 新增极客补发销售
export function addHairSalesman(data) {
  return request({
    url: '/system/hairSalesman',
    method: 'post',
    data: data
  })
}

// 修改极客补发销售
export function updateHairSalesman(data) {
  return request({
    url: '/system/hairSalesman',
    method: 'put',
    data: data
  })
}

// 删除极客补发销售
export function delHairSalesman(id) {
  return request({
    url: '/system/hairSalesman/' + id,
    method: 'delete'
  })
}
